package a01;
/**
 * @author Sven Eric Panitz
 */
import javax.swing.*;
import java.awt.event.*;

public class ButtonAnimation extends JPanel {

	private static final long serialVersionUID = 1L;
	private JButton b = new JButton("push to move");
	private MovablePanel mp = new MovablePanel();

	public ButtonAnimation() {
		add(mp);
		add(b);

		b.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				mp.doOnTick();
			}
		});
	}

	
}
